package com.jpyl.jpMedicalTreatment.view.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.model.GlideUrl;
import com.bumptech.glide.load.model.LazyHeaders;
import com.forxindu.kit.box.PreferenceKit;
import com.jpyl.jpMedicalTreatment.R;
import com.jpyl.jpMedicalTreatment.common.MedicalSettings;
import com.jpyl.jpMedicalTreatment.util.StringUtil;


/**
 * Created by 15697 on 2019/4/12.
 */

public class CheckItemPicDialog extends Dialog {
    Context context;
    TextView textView;
    ImageView imageView;
    String content = "", url = "";

    public CheckItemPicDialog(Context context, String content, String url) {
        super(context, R.style.myDialog);
        this.context = context;
        this.content = content;
        this.url = url;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        init();
    }

    private void init() {
        LayoutInflater inflater = LayoutInflater.from(context);
        View view = inflater.inflate(R.layout.activity_dialog_check_item, null);
        setContentView(view);
        setCancelable(true);
        setCanceledOnTouchOutside(true);
        textView = view.findViewById(R.id.tv_dialog_checkItem);
        imageView = view.findViewById(R.id.img_dialog_checkItem);
        textView.setText(content);
        StringUtil.setImageView(context, imageView, url,false);

    }

}
